package com.il.tl.builder;

import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;

import com.il.tl.views.UserAccessToken;
import com.il.tw.exception.TwitterServiceException;

public class TitterServiceBuilder {
	public static Twitter buildIntance(UserAccessToken tlAccessTocken) throws TwitterServiceException{
		Twitter twitter = new TwitterFactory().getInstance();
		AccessToken accessToken = null;
		accessToken = new AccessToken(tlAccessTocken.getAccessToken(), tlAccessTocken.getAccessTokenSecret());
		twitter.setOAuthAccessToken(accessToken);
		return null;
	}
}
